package com.neusoft.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.mapper.HomeMapper;
import com.neusoft.service.HomeService;
@Service
public class HomeServicelmpl implements HomeService{

	@Autowired
	private HomeMapper mp;
	@Override
	public Integer getsum1(Integer deptno) {
		// TODO Auto-generated method stub
		Integer sum=0;
		List<Integer> a =mp.getempno(deptno);
		for (Integer pp : a) {
			sum+=mp.getsum(pp);
		}
		return sum;
	}

	@Override
	public Integer getsum2(Integer deptno) {
		// TODO Auto-generated method stub
		Integer sum=0;
		List<Integer> a =mp.getempno(deptno);
		for (Integer pp : a) {
			sum+=mp.getsum2(pp);
		}
		return sum;
	}

}
